package com.lagou.serializer;

import org.springframework.stereotype.Component;

import java.io.IOException;

@Component
public interface Serializer {

    String ObjectToString(Object object) throws IOException;

    <T> T StringToObject(Class<T> clazz, String param) throws IOException;

    byte[] ObjectToByte(Object object) throws IOException;

    <T> T ByteToObject(Class<T> clazz, byte[] bytes) throws IOException;

}
